# Contributor: Damian Kurek <starfire24680@gmail.com>
# Maintainer: Damian Kurek <starfire24680@gmail.com>
pkgname=kodi-audioencoder-wav
pkgver=19.0.1
_realname=Matrix
pkgrel=0
pkgdesc="WAV encoder addon for Kodi"
options="!check" # no test suite
url="https://github.com/xbmc/audioencoder.wav"
arch="x86 x86_64 aarch64 armv7" # kodi
license="GPL-2.0-only"
makedepends="cmake kodi-dev"
source="$pkgname-$pkgver-$_realname.tar.gz::https://github.com/xbmc/audioencoder.wav/archive/$pkgver-$_realname.tar.gz"
builddir="$srcdir/audioencoder.wav-$pkgver-$_realname"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake/kodi \
		-DUSE_LTO=1
	make -C build
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="
729fbd590e231d5885b0cac9cc7439c040dbbcfe253847eeb726d4e9becd607105b01f6b1b77826a4eaf3ef2d18490777f84b8911a3fcc04be63c07d73ee9631  kodi-audioencoder-wav-19.0.1-Matrix.tar.gz
"
